window.onload = function() {
    var dom = document.getElementById('container2');
    var myChart = echarts.init(dom, null, {
      renderer: 'canvas',
      useDirtyRect: false
    });
    var app = {};
    
    var option;

    option = {
  xAxis: {
    type: 'category',
    data: ['美国', '巴西', '印度', '俄罗斯', '英国']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [
        {
          value: 103.3369,
          itemStyle: {
            color: 'blue'
          }
        },
        {
          value: 66.7019,
          itemStyle: {
            color: 'green'
          }
        },
        {
          value: 52.4651,
          itemStyle: {
            color: '#a90000'
          }
        },
        {
          value: 37.9363,
          itemStyle: {
            color: 'pink'
          }
        },
        {
          value: 17.8749,
          itemStyle: {
            color: 'skyblue'
          }
        },
      ],
      type: 'bar'
    }
  ]
};

    if (option && typeof option === 'object') {
      myChart.setOption(option);
    }

    window.addEventListener('resize', myChart.resize);
}
